<?xml version="1.0" encoding="ISO-8859-1" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:p="http://primefaces.org/ui"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:fn="http://java.sun.com/jsp/jstl/functions">

<h:head>
	<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
	<link rel="stylesheet"
		href="../resources/css/smoothness/jquery-ui-1.8.16.custom.css"
		type="text/css" />
	<script language="javascript" type="text/javascript"
		src="../resources/js/default.js"></script>
	<title>Lista de Disciplinas</title>
</h:head>
<h:body>



	<h:form id="form">

		<fieldset>

			<legend>Seja Bem-vindo ao Portal do Aluno</legend>


			<p:toolbar>
				<p:toolbarGroup align="left">
					<p:commandButton value="Boletim" image="ui-icon-search" />

					<p:commandButton value="Historico" image="ui-icon-note" />

					<p:commandButton value="Dados Pessoais" image="ui-icon-person" />
					<p:commandButton value="Salvar" disabled="true"
						image="ui-icon-disk" />
					<p:commandButton value="Excluir" image="ui-icon-trash" />
				</p:toolbarGroup>
				<p:toolbarGroup align="right">
					<p:commandButton value="Sair" image="ui-icon-power" />
				</p:toolbarGroup>
			</p:toolbar>

			<p:messages />
			<h:panelGrid columns="2">

<!-- 			<h:outputText value="#{fn:length(disciplinabean.lista)}" /> -->

				<h:form prependId="false">

					<p:dataTable id="dataTable" value="#{disciplinaBean.lista}" var="disciplina">
																	
						<f:facet name="header">  
            			Nome do Curso  ?
            			</f:facet>
						
						<p:column>
							<f:facet name="header"> Codigo da Disciplina </f:facet>
							<h:outputText value="#{disciplina.id}" />
						</p:column>

						<p:column>
							<f:facet name="header"> Nome Disciplina </f:facet>
							<h:outputText value="#{disciplina.nome}" />
						</p:column>


						<p:column>
							<f:facet name="header"> Carga Horaria </f:facet>
							<h:outputText value="#{(disciplina.cargaHoraria)} " />
						</p:column>
						
						<p:column>
							<f:facet name="header"> Curso da Disciplina Horaria </f:facet>
							<h:outputText value="#{(disciplina.curso.nome)} " />
						</p:column>
						<p:column>
							<f:facet name="header"> ID Curso da Disciplina Horaria </f:facet>
							<h:outputText value="#{(disciplina.curso.id)} " />
						</p:column>
						
						
						<f:facet name="footer">  
            			Total #{fn:length(disciplinaBean.lista)} Disciplinas 
        			</f:facet>


					</p:dataTable>
				</h:form>

			</h:panelGrid>

		</fieldset>
	</h:form>

</h:body>
</html>